from WeekThree.base.base import Base
from selenium.webdriver.common.by import By
import time
class Page(Base):
    name_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div/form/div[1]/div/div/div/input')

    def login_name(self, test):
        self.send_keys(self.name_loc, test)

    pwd_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div/form/div[2]/div/div/div/input')

    def login_pwd(self, test):
        self.send_keys(self.name_loc, test)

    role_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div/form/div[3]/div/div/div/input')

    def login_role(self, test):
        self.send_keys(self.name_loc, test)

    goen_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div/form/div[4]/div/button[1]')

    def login_goen(self):
        self.click(self.goen_loc)

    def login_go(self,name,pwd):
        self.open_url("http://localhost:8080/zhuce")
        print("打开网址")
        time.sleep(2)
        print("输入账号")
        print("输入密码")
        print("注册")
        # self.login_name(name)
        # self.login_pwd(pwd)
        # self.login_goen()



